﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//定义一个员工类，存放用户的工号、姓名和部门信息；定义两个构造函数，一个是无参；
//一个有参构造函数，对类的属性进行初始化。
namespace Demo04
{
    class Employee
    {
        private int id;
        private string name;
        private string department;

        public int Id
        {
            get { return this.id; }
            set { this.id = value; }
        }
        public string Name{
            get { return this.name; }
            set { this.name = value; }
        }
        public string Department {
            get { return this.department; }
            set { this.department = value; }
        }

        public Employee(int id,string name,string department)
        {
            this.id = id;
            this.name = name;
            this.department = department;
        }

        public Employee()
        {
        }

        public void PrintMsg()
        {
            Console.WriteLine("员工工号{0}，姓名{1}，部门信息为{2}",this.id, this.name, this.department);
        }
        public void PrintMsg1()
        {
            Console.WriteLine("员工工号{0}，姓名{1}，部门信息为{2}", this.id, this.name, this.department);
        }
    }
       
}
